{% extends "admin.html" %}

{% block title %}The Living History: Groups{% endblock %}

{% block mainheading %}Edit group: {{group.name}}{% endblock %}

{% block display %}

		<form action="/admin/editGroup/{{group.name}}" method="post">
		<table>
	      <tr>
		    <td>Name:</td>
			<td><input type="Text" name="name" size="25" value="{{group.name}}"></td>
		  </tr>
		  <tr>
			  <td>Permissions:</td>
			  <td>
			  <input type="Checkbox" name="permissions" value="timeline_edit" 
			  	{% for perm in group.permissions %}{% ifequal perm "timeline_edit" %}checked{%endifequal%}{%endfor%}>timeline_edit <br />
				
			  <input type="Checkbox" name="permissions" value="timeline_create" 
			  	{% for perm in group.permissions %}{% ifequal perm "timeline_create" %}checked{%endifequal%}{%endfor%}>timeline_create <br />
			  
			  <input type="Checkbox" name="permissions" value="timeline_delete"
			  	{% for perm in group.permissions %}{% ifequal perm "timeline_delete" %}checked{%endifequal%}{%endfor%}>timeline_delete <br />
			  
			  <input type="Checkbox" name="permissions" value="admin_access"
			  	{% for perm in group.permissions %}{% ifequal perm "admin_access" %}checked{%endifequal%}{%endfor%}>admin_access <br />
			  
			  <input type="Checkbox" name="permissions" value="user_edit"
			  	{% for perm in group.permissions %}{% ifequal perm "user_edit" %}checked{%endifequal%}{%endfor%}>user_edit <br />
			  
			  <input type="Checkbox" name="permissions" value="group_edit"
			  	{% for perm in group.permissions %}{% ifequal perm "group_edit" %}checked{%endifequal%}{%endfor%}>group_edit <br />
			  </td>
		  </tr>
		  <tr>
		  <td align="center" colspan="2"><input type="Submit" name="edit" value="Edit group"></td>
		  </tr>
		</table>
		</form>
		</p>

{% endblock %}